﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TipPanel : BasePanel<TipPanel>
{
    public UILabel labContent;
    public UIButton btnConfirm;
    Action callback;
    public override void Init()
    {
        Hide();
        btnConfirm.onClick.Add(new EventDelegate(() =>
        {
            Hide();
            if (callback != null)
            {
                callback();
            }
        }));
    }

    public void Show(string message, Action cb = null)
    {
        base.Show();
        labContent.text = message;
        this.callback = cb;
    }
}
